import React from 'react';
import { Redirect, Route, Switch } from 'react-router-dom';
import Home from '../pages/home/Home';
import Message from '../pages/message/Message';
import PersonalCenter from '../pages/personalCenter/PersonalCenter';
import Todo from '../pages/todo/Todo';

const TabbarRouter = () => {
    return (
        <Switch>
            <Route path="/home" exact component={Home}></Route>
            <Route path="/todo" exact component={Todo}></Route>
            <Route path="/message" exact component={Message}></Route>
            <Route path="/personalCenter" exact component={PersonalCenter}></Route>
            <Redirect exact to="/home" from="/" />
            <Route path="*" render={() => <Redirect to="/404"/>}></Route>
        </Switch>
    );
};

export default TabbarRouter;